package com.xtpt.disaster.common.consts;
/*
* 执行类型 0-备份  1-恢复
* */

public enum TaskTypeEnum implements BaseEnum{

    BACKUP(0,"备份操作"),
    RECOVER(1,"恢复操作");

    private String description;
    private Integer value;

    private TaskTypeEnum(Integer value,String description){
        this.description = description;
        this.value = value;
    }

    public static TaskTypeEnum getObject(Integer value){
        for(TaskTypeEnum taskEnum: TaskTypeEnum.values()) {
            if(taskEnum.getValue().equals(value)){
                return taskEnum;
            }
        }
        return null;
    }


    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }


    @Override
    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return getValue().toString();
    }
}
